package com.mw.repository;

import com.mw.domain.News;
import org.springframework.data.domain.Page;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import java.util.List;

public interface NewsRepository extends JpaRepository<News,Long>,JpaSpecificationExecutor{

    News findById(int id);

    List<News> findAllByTypeIsNotNull();

    List<News> findAllByTypeIsNull();

    News findByTitle(String title);

    

}
